const model = require('../models/BaseModel.js')
const { USERINFO } = require('../config/tableConfig.js')
const USERFIELD = {
  _id:true,
  mobile: true,
  username: true,
  uid:true,
  pass1:true,
}
/**
 * 查询用户信息
 * @return 
 */
const addUserService = (data) =>{
  console.log(data)
  return model.add(USERINFO,data)
}
/**
 * 用户验证登录
 * @return 
 */
const getUserService = (data) =>{
  console.log(data)
  return model.query(USERINFO, USERFIELD ,data)
}

module.exports = {
  addUserService,
  getUserService
}